package com.example.master.controller;

import com.example.master.service.*;
import com.example.master.utils.*;
import com.example.master.entity.vo.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

/**
 * @Author Mr.Yuan
 * @Date 2023/2/4 9:45
 * @PackageName:com.example.master.controller
 * @ClassName: ServiceController
 * @Description: TODO
 * @Version 1.0
 */
@CrossOrigin
@RestController
@RequestMapping("/game")
@Api(tags = "游戏模块", value = "服务Open api 入口")
public class GameController {
    @Autowired
    private GameService service;
    /***
     * 服务详情
     * @param subjectId
     * @return
     */
    @GetMapping("/{subjectId}")
    @ApiOperation(value = "游戏详情", response = GamesVO.class)
    public Result getGameById(@PathVariable("subjectId") Integer subjectId) {
        Result result = service.getId(subjectId);
        return result;
    }

}